#include <iostream>
#include <unistd.h>
int main()
{
	int all_block_num = 1000;
	for (int i = 0; i<all_block_num; i++)
	{
		if (i<all_block_num-1)
		{
			printf("\r读取中[%.2lf%%]:", i*100.0 / (all_block_num - 1));
            fflush(stdout);
		}
		else
		{
			printf("\r读取完成[%.2lf%%]:", i*100.0 / (all_block_num - 1));
		}
		int show_num = i * 50 / all_block_num;
		for (int j = 1; j <= show_num; j++)
		{
			std::cout << "█|";
			sleep(0.5);
		}
        fflush(stdout);
		
	}
	std::cout << std::endl;
	return 1;
}